import Taro, { Component } from '@tarojs/taro'
import { View, Text, Image, Picker, Swiper, SwiperItem } from '@tarojs/components'
import {AtRadio,AtButton} from 'taro-ui'
import './xuanZeJieZhenYiSheng.scss'
import { $redirectTo } from '../../../global';
import reactMixin from 'react-mixin';
import myJs from './xuanZeJieZhenYiShengJs.js'
import app from '../../../main.js'

export default class XuanZeJieZhenYiSheng extends Component {
    config = {
        navigationBarTitleText: '选择接诊医生'
    }
    constructor () { 
        super(...arguments); 
        this.state = this.getData(); 
    }
    // constructor () {
    //     super(...arguments)
    //     this.state = {
    //       value: ''
    //     }
    //   }
    //   handleChange (value) {
    //     this.setState({
    //       value
    //     })
    //   }
    init() {}
    go(){
        app.redirectTo('../zhuanzhenHuanZhe/zhuanzhenHuanZhe')
    }
    render () {
        return (
            <View className='xuanZeJieZhenYiSheng'>
                <AtRadio 
                options={
                    this.state.doctorss.items.map(item => {
                        return {
                          label: item.name,
                          value:item.id
                        }
                      })
                    }
                value={this.state.value}
                onClick={this.handleChange.bind(this)}
                >
                </AtRadio>
                <View className=' class_0'>
                    <View className=' class_1'>
                        <AtButton className=' class_2' onClick={this.go} full>
                            <Text className=' class_3'>下一步</Text>
                        </AtButton>
                    </View>
                </View>
            </View>
        );
    }
}
reactMixin.onClass(XuanZeJieZhenYiSheng,myJs);